

package mapbase
{
	public class mapTerrain
	{
		//格子数
		public static const one_Grids_W:int = 2;
		public static const one_Grids_H:int = 4;		
		
		public static const FLAG:int = 10000;
		
		public var bmp:int;
		
		public function mapTerrain(n:int):void
		{
			bmp = n;
		}
		
		public function get group():int
		{
			return getGroup(this.bmp);
		}
		
		public function get frame():int
		{
			return getFrame(this.bmp);
		}
		
		static public function getGroup(i:int):int
		{
			return int(i / FLAG);
		}
		
		static public function getFrame(i:int):int
		{
			return int(i % FLAG);
		}
		
		public static function createID(group:int,frame:int):int
		{
			return group * FLAG + frame;
		}
	}
}